withExponentialBackoff

fun <T> withExponentialBackoff(block: () -> Promise<T>, retries: Int = 3, baseMillis: Double = 200.0, factor: Double = 2.0): Promise<T>

Retries block with exponential backoff and jitter.